<template>
  <div class="collectWrapper">
    <div class="radioSeelct" v-show="showSelect"><Checkbox value="1" /></div>
    <RightMenu :menus="!showSelect ? menus : []" :data="props.message">
        <div class="collectContent">
          <div class="content">枯藤老树昏鸦，小桥流水人家，古道西风瘦马</div>
          <div class="info">
            <span>美团单车服务号</span>
            <span>2019年11月01日</span>
          </div>
        </div>
    </RightMenu>
  </div>
</template>
<script lang="ts" setup>
import { Checkbox } from 'ant-design-vue'
import RightMenu from './RightMenu.vue'
const props = defineProps({
  message: {
    type: Object,
    default: null
  },
  showSelect: {
    type: Boolean,
    default: false
  }
})
const emit = defineEmits(['dx'])
const menus = [
  { name: '转发', code: 'zf', action: (data: any) => {} },
  {
    name: '多选',
    code: 'dx',
    action: (data: any) => {
      emit('dx')
    }
  },
  { name: '删除', code: 'delete', action: (data: any) => {} }
]
</script>
<style lang="less" scoped>
.collectWrapper {
  display: flex;
  width: 95%;
  margin: 0 auto;
  .radioSeelct {
    width: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .collectContent {
    width: 100%;
    margin: 0 auto;
    background-color: white;
    box-shadow: 2px 2px 10px #f7f7f7;
    padding: 17px;
    border-radius: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
    .content {
      font-size: 15px;
      color: #000;
    }
    .info {
      font-size: 12px;
      display: flex;
      justify-content: space-between;
      color: #c3c3c3;
      margin-top: 20px;
    }
  }
}
</style>
